import {
  createRouter,
  createWebHistory,
  createWebHashHistory
} from 'vue-router'

import HomePage from './components/HomePage.vue'
import ListPage from './components/ListPage.vue'
import AboutPage from './components/AboutPage.vue'
import DetailPage from './components/DetailPage.vue'
import HomePage1 from './components/HomePage1.vue'
import HomePage2 from './components/HomePage2.vue'

const router = createRouter({
  history:createWebHistory(),
  routes:[
    {
      path:'/home',
      component:HomePage,
      children:[
        {
          path:'home1',
          component:HomePage1
        },
        {
          path:'home2',
          component:HomePage2
        }
      ]
    },
    {
      path:'/list',
      component:ListPage
    },
    {
      path:'/detail/:id',
      component:DetailPage
    },
    {
      path:'/about',
      component:AboutPage
    }
  ]
})

export default router
